﻿using PlcLib.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlcLib.Interface
{
    public interface IPlc
    {
        void Initialize(Net net);
        void Initialize(Port port);
        IPlcResult Start(Action action);
        void Stop();
        IPlcResult Read(Command command);
        IPlcResult<T> Read<T>(Command command);
        IPlcResult Write(Command command, int data);
        IPlcResult Write(Command command, List<int> data);
        IPlcResult<T> Write<T>(Command command, T data);
        IPlcResult Send(byte[] array);
        Task<IPlcResult> ReadAsync(Command command);
        Task<IPlcResult<T>> ReadAsync<T>(Command command);
        Task<IPlcResult> WriteAsync(Command command, int data);
        Task<IPlcResult> WriteAsync(Command command, List<int> data);
        Task<IPlcResult<T>> WriteAsync<T>(Command command, T data);
        Task<IPlcResult> SendAsync(byte[] array);

    }
}
